<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>aangel &#8212; Aangel Main &mdash; Interop Router 3.30 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
          URL_ROOT:    '../',
          VERSION:     '0',
          COLLAPSE_MODINDEX: false,
          FILE_SUFFIX: '.html'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="top" title="Interop Router 3.30 documentation" href="../index.html" />
    <link rel="up" title="Aangel Documentation" href="index.html" />
    <link rel="next" title="connection &#8212; Connection with Database" href="connect.html" />
    <link rel="prev" title="Aangel Documentation" href="index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="connect.html" title="connection &#8212; Connection with Database"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Aangel Documentation"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Interop Router 3.30 documentation</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">Aangel Documentation</a> &raquo;</li> 
      </ul>
    </div>  
    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  
  <div class="section" id="module-aangel">
<h1><tt class="xref docutils literal"><span class="pre">aangel</span></tt> &#8212; Aangel Main<a class="headerlink" href="#module-aangel" title="Permalink to this headline">¶</a></h1>
<p>This is the main module of Aangel, the Interop Router scheduller.</p>
<p>Aangel monitors the database looking for jobs without a clusterID, and calculates
the total of resources in the IR&#8217;s cluster network. So, it divides the jobs
among the clusters using a specific criterion.</p>
<p>In the version 1.0 (IR 3.3), this criterion is quite simple and considers 
only the free resources of the active cluster, without taking into 
account other factors.</p>
<dl class="class">
<dt id="aangel.Aangel">
<!--[aangel.Aangel]-->class <tt class="descname">Aangel</tt><a class="headerlink" href="#aangel.Aangel" title="Permalink to this definition">¶</a></dt>
<dd><p>This classes implements the Aangel&#8217;s operations.</p>
<dl class="method">
<dt id="aangel.Aangel.divide">
<!--[aangel.Aangel.divide]--><tt class="descname">divide</tt><big>(</big><em>clusters</em>, <em>jobs</em>, <em>resources</em><big>)</big><a class="headerlink" href="#aangel.Aangel.divide" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the method that implements the scheduing. 
It distributes a cluster ID for each job, until the end jobs
or no more sufficient resources.</p>
<p>jobs is a list where each element is a tuple with the job id and the
number of processors required by job.</p>
<p>clusters is a list of tuples with cluster id and its free resources.</p>
<p>resources is a total resources of IR&#8217;s network.</p>
</dd></dl>

<dl class="method">
<dt id="aangel.Aangel.getTotalResources">
<!--[aangel.Aangel.getTotalResources]--><tt class="descname">getTotalResources</tt><big>(</big><em>clusters</em><big>)</big><a class="headerlink" href="#aangel.Aangel.getTotalResources" title="Permalink to this definition">¶</a></dt>
<dd><p>This method calculates the total of clusters resources in 
the Interop Router&#8217;s network.</p>
<p>clusters is a list of tuples with cluster id and its free resources.</p>
</dd></dl>

<dl class="method">
<dt id="aangel.Aangel.work">
<!--[aangel.Aangel.work]--><tt class="descname">work</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#aangel.Aangel.work" title="Permalink to this definition">¶</a></dt>
<dd><p>This method realizes the Aangel&#8217;s task.</p>
<p>It captures the jobs to allocata,
verify if there are free resources and distribute the jobs among clusters.</p>
<p>In the end, it send the results to database, changing the job id to the
new ids.</p>
<p>connection is a Connection object, from connectSQL module.</p>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h4>Previous topic</h4>
            <p class="topless"><a href="index.html" title="previous chapter">Aangel Documentation</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="connect.html" title="next chapter"><tt class="docutils literal"><span class="pre">connection</span></tt> &#8212; Connection with Database</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../_sources/aangel/aangel.txt">Show Source</a></li>
            </ul>
          <h3>Quick search</h3>
            <form class="search" action="../search.html" method="get">
              <input type="text" name="q" size="18" /> <input type="submit" value="Go" />
              <input type="hidden" name="check_keywords" value="yes" />
              <input type="hidden" name="area" value="default" />
            </form>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="connect.html" title="connection &#8212; Connection with Database"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Aangel Documentation"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Interop Router 3.30 documentation</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">Aangel Documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright .
      Last updated on Dec 17, 2008.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
    </div>
  </body>
</html>